package com.ruoyi.record.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.record.mapper.SalesRecordMapper;
import com.ruoyi.record.domain.SalesRecord;
import com.ruoyi.record.service.ISalesRecordService;

/**
 * 销售管理Service业务层处理
 * 
 * @author yx
 * @date 2024-12-19
 */
@Service
public class SalesRecordServiceImpl implements ISalesRecordService 
{
    @Autowired(required = false)
    private SalesRecordMapper salesRecordMapper;

    /**
     * 查询销售管理
     * 
     * @param recordId 销售管理主键
     * @return 销售管理
     */
    @Override
    public SalesRecord selectSalesRecordByRecordId(Long recordId)
    {
        return salesRecordMapper.selectSalesRecordByRecordId(recordId);
    }

    /**
     * 查询销售管理列表
     * 
     * @param salesRecord 销售管理
     * @return 销售管理
     */
    @Override
    public List<SalesRecord> selectSalesRecordList(SalesRecord salesRecord)
    {
        return salesRecordMapper.selectSalesRecordList(salesRecord);
    }

    /**
     * 新增销售管理
     * 
     * @param salesRecord 销售管理
     * @return 结果
     */
    @Override
    public int insertSalesRecord(SalesRecord salesRecord)
    {
        return salesRecordMapper.insertSalesRecord(salesRecord);
    }

    /**
     * 修改销售管理
     * 
     * @param salesRecord 销售管理
     * @return 结果
     */
    @Override
    public int updateSalesRecord(SalesRecord salesRecord)
    {
        return salesRecordMapper.updateSalesRecord(salesRecord);
    }

    /**
     * 批量删除销售管理
     * 
     * @param recordIds 需要删除的销售管理主键
     * @return 结果
     */
    @Override
    public int deleteSalesRecordByRecordIds(Long[] recordIds)
    {
        return salesRecordMapper.deleteSalesRecordByRecordIds(recordIds);
    }

    /**
     * 删除销售管理信息
     * 
     * @param recordId 销售管理主键
     * @return 结果
     */
    @Override
    public int deleteSalesRecordByRecordId(Long recordId)
    {
        return salesRecordMapper.deleteSalesRecordByRecordId(recordId);
    }
}
